package com.hp.ssmp.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@TableName("t_user")  //将该实体类与数据库表进行映射
public class TUser {
  @TableId(value = "USERID", type = IdType.AUTO) //将属性名与字段名进行映射,同时标注主键列, 指定自动增长type = IdType.AUTO
  private Long userid;
  //@TableField("USERCODE") //将属性名与字段名进行映射
  private String usercode;
  //@TableField("USERNAME")
  private String username;
  //@TableField("EMAIL")
  private String email;
  //@TableField("PASSWORD")
  private String password;
  //@TableField("SALT")
  private String salt;
  //@TableField("SEX")
  private Long sex;
  //@TableField("BIRTHDAY")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private Date birthday;
  //@TableField("PHONENO")
  private String phoneno;
  //@TableField("HEADER")
  private String header;
  //@TableField("TYPE")
  private Long type;
  //@TableField("STATUS")
  private Long status;


  public Long getUserid() {
    return userid;
  }

  public void setUserid(Long userid) {
    this.userid = userid;
  }

  public String getUsercode() {
    return usercode;
  }

  public void setUsercode(String usercode) {
    this.usercode = usercode;
  }

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }


  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }


  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }


  public String getSalt() {
    return salt;
  }

  public void setSalt(String salt) {
    this.salt = salt;
  }


  public Long getSex() {
    return sex;
  }

  public void setSex(Long sex) {
    this.sex = sex;
  }


  public Date getBirthday() {
    return birthday;
  }

  public void setBirthday(Date birthday) {
    this.birthday = birthday;
  }


  public String getPhoneno() {
    return phoneno;
  }

  public void setPhoneno(String phoneno) {
    this.phoneno = phoneno;
  }


  public String getHeader() {
    return header;
  }

  public void setHeader(String header) {
    this.header = header;
  }


  public Long getType() {
    return type;
  }

  public void setType(Long type) {
    this.type = type;
  }


  public Long getStatus() {
    return status;
  }

  public void setStatus(Long status) {
    this.status = status;
  }

  @Override
  public String toString() {
    return "TUser{" +
            "userId=" + userid +
            ", usercode='" + usercode + '\'' +
            ", username='" + username + '\'' +
            ", email='" + email + '\'' +
            ", password='" + password + '\'' +
            ", salt='" + salt + '\'' +
            ", sex=" + sex +
            ", birthday=" + birthday +
            ", phoneno='" + phoneno + '\'' +
            ", header='" + header + '\'' +
            ", type=" + type +
            ", status=" + status +
            '}';
  }
}
